<form id="form1" class="layui-form layui-form-pane" action="<Api runat="server" control="#__DYNAMIC_CONTROL__" action="#__DYNAMIC_ACTION__"/>" method="post">
	<div class="col-md-8 col-sm-6">
		<div class="layui-form-item">
			<label class="layui-form-label">名称 <span class="red">*</span></label>
			<div class="layui-input-block">
				<input type="text" name="Name" placeholder="显示的分类名称" class="layui-input"/>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">别名</label>
			<div class="layui-input-block">
				<input type="text" name="Alias" placeholder="默认：父分类别名-分类名" class="layui-input"/>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">SEO标题</label>
			<div class="layui-input-block">
				<input type="text" name="Title" placeholder="分类页面标题，用于SEO优化" class="layui-input"/>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">SEO关键词</label>
			<div class="layui-input-block">
				<input type="text" name="Keywords" placeholder="分类页关键词，用于SEO优化" class="layui-input"/>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">SEO描述</label>
			<div class="layui-input-block">
				<textarea name="Description" class="layui-textarea" placeholder="分类页描述，用于SEO优化"></textarea>
			</div>
		</div>
	</div>
	<div class="col-md-4 col-sm-6">
		<div class="layui-form-item">
			<label class="layui-form-label">父分类</label>
			<div class="layui-input-block">
				<CategorySelect runat="server" name="Parent" curr_id="#$_GET['id']" first_item_text="无" first_item_value="0"/>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">顺序</label>
			<div class="layui-input-block">
				<input type="text" name="Index" placeholder="前-后：0-255" value="0" class="layui-input"/>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">分类模版</label>
			<div class="layui-input-block">
				<select runat="server" name="CategoryTemplate" data_func="getCategoryTemplates" text_field="value"/>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">文章模版</label>
			<div class="layui-input-block">
				<select runat="server" name="ArticleTemplate" data_func="getArticleTemplates" text_field="value"/>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">显示</label>
			<div class="layui-input-block">
				<input type="checkbox" name="IsShow" value="1" un-checked-value="0" title="前台" checked/>
      			<input type="checkbox" name="NavigationShow" value="1" un-checked-value="0" title="导航栏" checked/>
			</div>
		</div>
		<div class="center">
			<if condition="isset($_GET['id'])">
				<input type="hidden" name="ID"/>
			</if>
			<button class="layui-btn" lay-submit style="width:100%">保存</button>
		</div>
	</div>
</form>
<script>
	<if condition="isset($_GET['id'])">
	$(function(){
		var fo = new FindOption({url:'<Api runat="server" control="#__DYNAMIC_CONTROL__" action="find"/>',params:{ID:<%=Request::get('id')%>},formElement:$('#form1')});
	});
	</if>
</script>